<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>计划执行-计划新增详情页面</title>
    <script src="/scripts/boot.js"></script>
    <link href="/scripts/daterangepicker/js/daterangepicker.min.css" rel="stylesheet" type="text/css" />
    <script src="/scripts/daterangepicker/js/moment.js" type="text/javascript"></script>
    <script src="/scripts/daterangepicker/js/jquery.daterangepicker.min.js" type="text/javascript"></script>
    <script src="/scripts/daterangepicker/ux.daterangepicker.js" type="text/javascript"></script>
    <link href="/scripts/daterangepicker/css/skin.css" rel="stylesheet" type="text/css" />
    <style>
        html body .searchbox .mini-buttonedit-icon
        {
            /*background:url(static/scripts/daterangepicker/search.gif) no-repeat 50% 50%;*/
        }
    </style>
</head>
<body class="bg-white">
<div id="viewForm">
    <div class="title-info mb-20"><span>计划信息</span></div>
    <table class="table-bg" border="0" cellpadding="1" cellspacing="1" style="width:100%;table-layout:fixed;">
        <colgroup>
            <col width="135px"></col>
            <col width="50%"></col>
            <col width="135px"></col>
            <col width="50%"></col>
        </colgroup>
        <tr>
            <td class="text-titlebg"><span class="color-red">*</span>计划类型</td>
            <td>
                    <div class="color-66 input-div" id="planTypeName"></div>
                <!--<select id="planType" name="planType" class="mini-combobox w250" ajaxType="post" url="/dictionary/listValues?name=plan_type" textField="value" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>-->
            </td>
            <td class="text-titlebg">
                <span class="color-red">*</span>选择项目计划
            </td>
            <td>
                <div class="color-66 input-div" id="planName"></div>
                <!--<select id="planCombo" name="planId" class="mini-combobox w250" url="/planExe/planList?planTypeId=221" textField="name" valueField="id" required="true"  errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">
                <span class="color-red">*</span>业务板块
            </td>
            <td>
                <div class="color-66 input-div" id="businessName"></div>
                <!--<select id="busiMode" name="busiMode" class="mini-combobox w250" ajaxType="post" url="/dictionary/listValues?name=busi_mode" textField="value" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>-->
            </td>
            <td class="text-titlebg"><span class="color-red">*</span>计划性质</td>
            <td>
                <div class="color-66 input-div" id="nodePropertyName"></div>
                <!--<select id="nodeProperty" name="nodeProperty" class="mini-combobox w250" ajaxType="post" url="/dictionary/listValues?name=nodeProperty" textField="value" valueField="id" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"></select>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">
                <span class="color-red">*</span>计划起止时间
            </td>
            <td>
                <div class="color-66 input-div" id="beginDate"></div>
                <!--<input id="date-range1" name="ssDate" class="uc-daterangepicker searchbox w250" />-->
            </td>
            <td class="text-titlebg">
                <span class="color-red">*</span>计划内容
            </td>
            <td>
                <div class="color-66 input-div" id="nodeNames"></div>
                <!--<input type="text" name="planNodeName" id="planNodeName" class="mini-textbox w250" required="true" errorMode="none" onvalidation="onNullValidation" requiredErrorText="请输入"　vtype="maxLength:48"/>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg"><span class="color-red">*</span>执行人</td>
            <td>
                <div class="color-66 input-div" id="postPersonName"></div>
                <!--<input name="evaluateId" id="evaluateId" class="mini-treeselect w250" onbeforenodeselect="common.beforenodeselect" expandOnLoad="true" showTreeIcon="true" valueField="id" textField="name"   parentField="pid"   required="true"   vtype="maxLength:48"  errorMode="none" onvalidation="upChoseError" requiredErrorText="请选择"/>-->
            </td>
            <td class="text-titlebg">配合人</td>
            <td>
                <div class="color-66 input-div" id="cooperatePostPersonName"></div>
                <!--<input name="evaluate" id="evaluate" class="mini-treeselect w250" onbeforenodeselect="common.beforenodeselect" expandOnLoad="true" showTreeIcon="true" valueField="id" textField="name"   parentField="pid"  vtype="maxLength:48"  errorMode="none" onvalidation="upChoseError" requiredErrorText="请选择"/>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">
                配合起止时间
            </td>
            <td>
                <div class="color-66 input-div" id="cooperateDate"></div>
                <!--<input id="date-range" name="cooperateDate" class="uc-daterangepicker searchbox w250" />-->
            </td>
            <td class="text-titlebg">配合事项</td>
            <td>
                <div class="color-66 input-div" id="cooperateMatters"></div>
                <!--<input type="text" name="cooperateMatters" class="mini-textbox w250"  errorMode="none" onvalidation="onNullValidation" requiredErrorText="请输入"　vtype="maxLength:48"/>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">完成标准</td>
            <td colspan="3">
                <div class="color-66 textarea-div" id="completeStandard"></div>
                <!--<textarea name="completeStandard" class="mini-textarea wtextarea" emptyText=""></textarea>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">工期说明</td>
            <td colspan="3">
                <div class="color-66 textarea-div" id="deadlineDesc"></div>
                <!--<textarea name="deadlineDesc" class="mini-textarea wtextarea" emptyText=""></textarea>-->
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">备注</td>
            <td colspan="3" class="wp">
                <div class="color-66 textarea-div" id="remark"></div>
                <!--<textarea name="remark" class="mini-textarea wtextarea" emptyText=""></textarea>-->
                <!--<input name="id" id="planNodeId" class="mini-hidden"/>-->
            </td>
        </tr>
    </table>
    <div>
		<iframe id="workflowiframe" src=""  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" width="100%" frameborder="0" height="750"></iframe>
	</div><!-- 
    <div class="mini-fit"></div>
    <div class="chose-toolbar">
        <a class="chose-button" onclick="CloseWindow('close')">取消</a>
    </div> -->
</div>
<script src="/scripts/res/js/common.js"></script>
<script type="text/javascript">
    var post_flag,form,state,datas;
    var view = {
        init: function () {
            post_flag = false; //设置一个对象来控制是否进入AJAX过程
            mini.parse();
            form = new mini.Form("#viewForm");
            
            if(view.getURLParameter("id")){
            	view.SetData({"id":view.getURLParameter("id")});
            }
            if(view.getURLParameter("userId")){
	            var userId=view.getURLParameter("userId");
	        	var token=view.getURLParameter("token");
	        	var taskName=view.getURLParameter("taskName");
	        	var taskId=view.getURLParameter("taskId");
	        	var taskDefKey=view.getURLParameter("taskDefKey");
	        	var procInsId=view.getURLParameter("procInsId");
	        	var procDefId=view.getURLParameter("procDefId");
	        	var status=view.getURLParameter("status");
	        	var id=view.getURLParameter("id");
	        	
	        	$('#workflowiframe').attr('src','http://114.242.165.90:15986/workflow/a/oa/testAudit/form?'+
	        			'act.taskId='+taskId+
	        			'&act.taskName='+taskName+
	        			'&act.taskDefKey='+taskDefKey+
	        			'&act.procInsId='+procInsId+
	        			'&act.procDefId='+procDefId+
	        			'&act.status='+status+
	        			'&id='+id+
	        			'&act.userId='+userId+
	        			'&act.token='+token);
            }
        },

        getURLParameter: function (name) { 
        	return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
        },
//    数据展示
        SetData: function (data) {
            data = mini.clone(data);
            state = data.state;
            $.ajax({
                url:"/monthlyPlanExecution/newInfo?id=" + data.id,
                type: "post",
                success: function (text) {
                    var obj = JSON.parse(text);
                    //跨页面传递的数据对象，克隆后才可以安全使用
                    datas = mini.decode(obj.body[0]);   //反序列化成对象
                    // form.setData(datas);             //设置多个控件数据
                    var beDate,beDates;
                    $.each(datas,function (key,value) {
                        $("#"+key).html(value);

                        if(key=="beginDate"){
                            beDate=value;
                        }
                        if(key=="endDate"){
                            if(value){
                                beDate=beDate+" ~ "+value;
                            }
                        }
                        if(key=="cooperateBeginDate"){
                            beDates=value;
                        }
                        if(key=="cooperateEndDate"){
                            if(value){
                                beDates=beDates+" ~ "+value;
                            }
                        }
                        if(key=="nodeName"){
                            $("#nodeNames").html(value);
                        }
                        $("#beginDate").text(beDate);
                        $("#cooperateDate").text(beDates);
                    })
                }
            });
        }
    };
    view.init();
</script>
</body>
</html>